package com.android.vtca.sudoky;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class mainMenu extends Activity implements OnClickListener {

	@Override
	protected void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);

		if (GameSettings.GetInstance() == null) {
			new GameSettings(this);
		}
		setContentView(R.layout.layout_main_menu);

		findViewById(R.id.btn_exit).setOnClickListener(this);
		findViewById(R.id.btn_play).setOnClickListener(this);
		findViewById(R.id.btn_besttime).setOnClickListener(this);
		findViewById(R.id.btn_setting).setOnClickListener(this);
		findViewById(R.id.btn_help).setOnClickListener(this);
		findViewById(R.id.btn_about).setOnClickListener(this);

	}

	@Override
	public void onClick(View v) {
		Intent intentMainMenu = null;
		switch (v.getId()) {

		case R.id.btn_exit:
			finish();
			break;
		case R.id.btn_play:
			intentMainMenu = new Intent(this, GamePlay.class);
			startActivity(intentMainMenu);
			finish();
			break;
		case R.id.btn_besttime:
			intentMainMenu = new Intent(this, BestTimesMenu.class);
			startActivity(intentMainMenu);
			finish();
			break;
		case R.id.btn_setting:
			intentMainMenu = new Intent(this, SettingsMenu.class);
			startActivity(intentMainMenu);
			finish();
			break;
		case R.id.btn_help:
			intentMainMenu = new Intent(this, HelpMenu.class);
			startActivity(intentMainMenu);
			finish();
			break;
		case R.id.btn_about:
			intentMainMenu = new Intent(this, AboutMenu.class);
			startActivity(intentMainMenu);
			finish();
			break;
		default:
			break;
		}

	}
}
